package com.shg.web.action;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;

import com.shg.bean.OrderItem;
import com.shg.service.OrderItemService;

@Controller
public class OrderItemAction {

	//订单号
	private String orderid;
	//订单
	private OrderItem orderItem;
	//
	private String message;
	
	@Resource OrderItemService orderItemService;
	/**
	 * 获取订单项
	 * @return
	 */
	public String item(){
		try {
			orderItem =(OrderItem)orderItemService.getItem(orderid);
		} catch (Exception e) {
			e.printStackTrace();
			this.message="操作发生异常";
			return "error";
		}
		return "item";
	}

	public String getOrderid() {
		return orderid;
	}

	public void setOrderid(String orderid) {
		this.orderid = orderid;
	}

	public OrderItem getOrderItem() {
		return orderItem;
	}

	public void setOrderItem(OrderItem orderItem) {
		this.orderItem = orderItem;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}
}
